package com.sxt.md5;

import org.apache.shiro.crypto.hash.Md5Hash;

public class Md5Demo {
    public static void main(String[] args) {
        String pwd ="123";
        //简单加密，可以被暴力破解
        Md5Hash md5Hash = new Md5Hash(pwd);
        System.out.println("加密后："+md5Hash.toHex());

        //加盐的操作
        Md5Hash md5Hash1 = new Md5Hash(pwd,"uu");
        System.out.println("加盐后："+md5Hash1);
        //迭代次数（重复加盐的才次数）
        Md5Hash md5Hash2 = new Md5Hash(pwd,"uu",3);
        System.out.println("加盐后："+md5Hash2);
    }
}
